<template>
  <div class="list">
    <tar-bar :title="title" />
    <div class="body">
      <div class="top"></div>
      <div class="lunbo">
        <div class="imgs">
          <div class="house">
            <div class="house_left">
              <van-image width="60" height="60" :src="img2" />
            </div>
            <div class="house_right">
              <div>2</div>
              <div>公房套数</div>
            </div>
          </div>
          <div class="house2">
            <div class="house_left">
              <van-image width="60" height="60" :src="img1" />
            </div>
            <div class="house_right">
              <div>2</div>
              <div>公房面积</div>
            </div>
          </div>
        </div>
      </div>
      <div class="title">
        <div></div>
        <div>房屋服务</div>
      </div>
      <div class="apply_house">
        <div class="imgs" v-for="(item,index) in imgs" :key="index" @click="apply(index)">
          <div class="imgs_left">{{item.name}}</div>
          <van-image width="100%" height="155" :src="item.img" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import tarBar from "../components/tarBar/index.vue";
export default {
  data() {
    return {
      img1: require("../assets/images/area.png"),
      img2: require("../assets/images/house.png"),
      imgs: [
        {img: require("../assets/images/applyHouse.png"),name:"周转房申请"},
        {img: require("../assets/images/backRant.png"),name:"周转房续租"},
        {img: require("../assets/images/renew.png"),name:"周转房退租"},
      ],
      title: "首页",
    };
  },
  components: { tarBar },
  methods: {
    apply(item){
      if(item == 0){
        this.$router.push({name:'applyHouse'})
      }else if(item == 1){
        this.$router.push({name:'selectHouse',params:{title:'周转房续租'}})
      }else if(item == 2){
        this.$router.push({name:'backRent',params:{title:'周转房退租'}})
      }
    },
    goModel() {
      this.$toast({
        msg: "成功提示",
        type: "success",
      });
    },
  },
};
</script>

<style scoped lang="less">
.list {
  height: 100vh;
  width: 100%;
  .listItem {
    width: 100%;
    padding: 0 15px;
    height: 45px;
    line-height: 45px;
    position: relative;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }
  .im {
    width: 100px;
    height: 100px;
  }
  .body {
    // margin-top: 45px;
    .top {
      height: 150px;
      width: 100%;
      background-color: #4868F1;
    }
    .lunbo {
      background: #ffffff;
      box-shadow: 0px 0px 6px 2px rgba(92, 136, 251, 0.12);
      border-radius: 8px;
      width: 355px;
      height: 134px;
      margin-top: -120px;
      margin-left: 10px;
      .imgs {
        display: flex;
        .house {
          display: flex;
          margin-top: 40px;
          margin-left: 14px;
          .house_left {
            margin-top: 3px;
          }
          .house_right {
            :nth-child(1) {
              font-weight: 500;
              color: #ff7a00;
              line-height: 40px;
              font-size: 28px;
            }
            :nth-child(2) {
              font-weight: 400;
              color: #666666;
              line-height: 21px;
              font-size: 15px;
            }
          }
        }
        .house2 {
          display: flex;
          margin-top: 40px;
          margin-left: 75px;
          .house_left {
            margin-top: 3px;
          }
          .house_right {
            :nth-child(1) {
              font-weight: 500;
              color: #ff7a00;
              line-height: 40px;
              font-size: 28px;
            }
            :nth-child(2) {
              font-weight: 400;
              color: #666666;
              line-height: 21px;
              font-size: 15px;
            }
          }
        }
      }
    }
    .title {
      margin-top: 20px;
      display: flex;
      :nth-child(1) {
        margin-top: 4px;
        margin-left: 5px;
        margin-right: 5px;
        width: 3px;
        height: 20px;
        background: #4868F1;
        border-radius: 2px;
      }
      :nth-child(2) {
        font-size: 22px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #333333;
        line-height: 30px;
      }
    }
    .apply_house {
      margin-top: 10px;
      .imgs {
        .imgs_left {
          position: absolute;
          z-index: 10;
          margin-top: 30px;
          font-weight: 500;
          color: #8b603b;
          font-size: 28px;
          margin-left: 40px;
      }
    }
  }
  }
}
</style>
